<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Flex弹性布局开发今日头条热门视频</title>
    <style>
        body {
            margin: 0px;
        }

        .main {
            width: 320px;
            height: 700px;
            border: 1px solid blue;
            margin: 40px auto 0px;
        }

        .main .header {
            width: 100%;
            display: flex;
            align-items: center;
            margin-bottom: 10px;
        }

        .main .header .title {
            flex-grow: 1;
            font-size: 20px;
            margin-left: 10px;
        }

        .main .header .sx {
            margin-left: 5px;
        }

        .main .neirong {
            /* width: 100%;*/
            height: 94px;
            background-color: beige;
            display: flex;
        }

        .main .neirong .neirong-con-img {
            width: 126px;
            background-color: aqua;
            margin-right: 10px;
            flex-shrink: 0;
            /*内容不挤压这边的内容*/
        }

        .main .neirong .neirong-con-txt {
            background-color: bisque;
            flex-grow: 1;
        }

        .main .neirong .neirong-con-img a img {
            width: 100%;
            height: 100%;
            /*按图片原始比例来裁剪图片*/
            object-fit: cover;
        }

        a {
            text-decoration: none;
            color: black;
        }

        .main .neirong .neirong-con-txt {
            display: flex;
            flex-direction: column;

        }

        .neirong .neirong-con-txt a {
            font-size: 16px;
            color: #222;
            max-width: 100px;
            line-height: 22px;
            /*超出部分显示隐藏*/
            overflow: hidden;
            /*弹性伸缩盒子模型显示*/
            display: -webkit-box;
            /*设置或检索伸缩盒子对象的子元素的排列方式*/
            -webkit-box-orient: vertical;
            /*限制在一个块级元素显示的文本的行数*/
            -webkit-line-clamp: 2;
            /*文本溢出显示省略号*/
            text-overflow: ellipsis;
        }

        .like {
            font-size: 12px;
            color: #f04142;
            border-radius: 4px;
            align-self: flex-start;
            padding: 3px 6px;
            margin-top: 5px;
        }

        .desc {
            color: #999;
            font-size: 14px;
            display: flex;
            justify-content: space-between;
            margin-top: 5px;
            padding: 0 5px;

        }
    </style>
</head>

<body>
    <div class="main">
        <div class="header">
            <img src="images/icon-play.png" alt="" width="22">
            <span class="title">热门视频</span>
            <img src="images/icon-sx2.png" alt="" width="16">
            <span class="sx">换一换</span>
        </div>
        <div class="neirong">
            <div class="neirong-con-img">
                <a href="#">
                    <img src="images/toutiao-01.jpeg" alt="">
                </a>
            </div>
            <div class="neirong-con-txt">
                <a href="#" class="tite"> 司马南：中国与俄罗斯的底线</a>
                <span class="like">1万评价啊</span>
                <div class="desc">
                    <span>148万次观看</span>
                    <span class="right">司马男频道</span>
                </div>
            </div>
        </div>
    </div>

</body>

</html>